import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import fire_component_msg from '@feidao/web/atom/browser/fsm/fire-component-msg';
import show from '../atom/show';
import hide from '../atom/hide';

export default async function a002(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	//  保存/确认
	const f = fd.data.node.querySelector<HTMLFormElement>("#check_attendance_rule_form")

	const rule_name = f.rule_name.value
	const start_month = f.start_month.value
	const end_month = f.end_month.value
	const up_time = f.up_time.value
	const down_time = f.down_time.value
	
	if(!rule_name){
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写考勤规则名称')
	}else if(!start_month){
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写试用开始月份')
	}else if(!end_month){
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写试用结束月份')
	}else if(!up_time){
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写上班考勤时间')
	}else if(!down_time){
		fire_component_msg('zj-common-002', 'ec-001', 'fail', '请填写下班考勤时间')
	}

}
